VB5 Control Creation Edition Marquee ActiveX Control |
| Home | Site Map |
|
The scrolling text below is displayed using a marquee control created with the Control Creation Edition of Visual Basic 5.0. The buttons below can be used to change the operation of the control.
Message Text |
|||
Scroll Mode |
|||
Start / Stop |
The Text Property
The string displayed by the marquee control is held in the control's Text property. To display a new string,
the VBScript code changes the Text property, and then sets the Scrolling property to True so the control will update itself.
The code fires when the page is loaded and when the Change Text button is pressed.
Sub btnChange_onClick Marquee.Text = txtMsg.Value Marquee.Scrolling = True End SubThe ScrollMode Property
This code toggles the ScrollMode and updates the button with the correct direction. Pressing the "Scroll Mode" button fires code that toggles the ScrollMode property and updates the button's text:
Sub btnScrollMode_onClick If Marquee.ScrollMode = 0 Then Marquee.Scrolling = False Marquee.ScrollMode = 1 Marquee.Scrolling = True btnScrollMode.Value = "Right to Left" Else Marquee.Scrolling = False Marquee.ScrollMode = 0 Marquee.Scrolling = True btnScrollMode.Value = "Left to Right" End If End SubThe Scrolling Property
Sub btnStartStop_onClick If Marquee.Scrolling Then Marquee.Scrolling = False btnStartStop.Value = "Start" Else Marquee.Scrolling = True btnStartStop.Value = "Stop" End If End Sub